﻿#region

using System.Text.RegularExpressions;

#endregion


namespace OMS.Ice.T4Generator.Syntax
{
    internal class TemplateDirective : Directive
    {
        public TemplateDirective(Match match, MacroResolver macroResolver)
            : base( match, macroResolver )
        {
        }

        public string Language
        {
            get
            {
                string language;
                return Attributes.TryGetValue( "language", out language ) ? language : "C#";
            }
        }

        public string CompilerVersion
        {
            get
            {
                string compilerVersion;
                return Attributes.TryGetValue( "compilerversion", out compilerVersion ) ? compilerVersion : "";
            }
        }

        public string ClassName
        {
            get
            {
                string className;
                return Attributes.TryGetValue( "classname", out className ) ? className : string.Empty;
            }
        }

        public string CodeFile
        {
            get
            {
                string codeFile;
                return Attributes.TryGetValue( "codefile", out codeFile ) ? codeFile : string.Empty;
            }
        }
    }
}